<%@page import="com.wanmait.cookbook.vo.Pager"%>
<%@page import="com.wanmait.cookbook.vo.Cookbook"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%String path = request.getContextPath(); %>
<jsp:include page="/manage/inc/head.jsp"></jsp:include>
<jsp:include page="/manage/inc/menu.jsp"></jsp:include>
<!--/sidebar-->
<div class="main-wrap">

	<div class="crumb-wrap">
		<div class="crumb-list">
			<i class="icon-font"></i><a href="<%=path%>/manage/index.jsp">首页</a><span
				class="crumb-step">&gt;</span><span class="crumb-name">首页轮播图管理</span>
		</div>
	</div>
	<div class="search-wrap">
		<div class="search-content">
			<form action="<%=path %>/CookbookManageServlet?action=findCookbooksByInter" id="myform" method="post">
				<table class="search-tab">

				</table>
			</form>
		</div>
	</div>
	<div class="result-wrap">

		<form name="myform" id="myform1" method="post">
			<div class="result-title">
				<div class="result-list">
				</div>
			</div>
			<div class="result-content">
				<table class="result-tab" width="100%">
					<tr>
						<th>序号</th>
						<th>食谱名称</th>
						<th>分类</th>
						<th>首页展示图</th>
						<th>上传者</th>
						<th>浏览量</th>
						<th>上传时间</th>
						<th>收藏量</th>
						<th>操作</th>
					</tr>
					<%
                        	List<Cookbook> allCookbook =(List<Cookbook>)request.getAttribute("cookbooks");
                        	List<Integer> cookbookCollectCounts =(List<Integer>)request.getAttribute("nums");
                        	for(int i=0;i<allCookbook.size();i++) {	
                        %>
					<tr id="tr<%=allCookbook.get(i).getId()%>">
						<td><%=i+1 %></td>
						<td><%=allCookbook.get(i).getTitle() %></td>
						<td><%=allCookbook.get(i).getRecipeTypeSecond().getTitle() %></td>
						<td><img
							src="<%=path%>/static/image/<%=allCookbook.get(i).getPic() %>"
							width="50" height="50"></td>
						<td><%=allCookbook.get(i).getUserinfo().getUsername()%></td>
						<td><%=allCookbook.get(i).getPageviews() %></td>
						<td><%=allCookbook.get(i).getInputTime() %></td>
						<td><%=cookbookCollectCounts.get(i) %></td>
						<td><a class="link-del"
							id="del<%=allCookbook.get(i).getId() %>"
							href="<%=path%>/indexCarouselManageServlet?action=getNotIndexCookbookList&id=<%=allCookbook.get(i).getId() %>">更换</a></td>
					</tr>
					<%
                        	}
                        %>
				</table>
			</div>
		</form>
	</div>
</div>
<!--/main-->
<jsp:include page="/manage/inc/foot.jsp"></jsp:include>
<script>

</script>